/*
 * Copyright (C) 2009-2018 Hangzhou 2Dfire Technology Co., Ltd. All rights reserved
 */
package com.ws.soa.consumer.controller;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * FileUploadController
 * 文件上传
 *
 * @author luobosi@2dfire.com
 * @since 2019-02-18
 */
@RestController
@RequestMapping(("/file"))
public class FileUploadController {

    /**
     * 文件上传上传
     *
     * @param file      文件实体
     * @return          上传之后的图片连接
     */
    @PostMapping(value = "/v1/upload")
    @ResponseStatus(HttpStatus.OK)
    public Boolean uploadImage(@RequestBody MultipartFile file) {
        if (file != null && !file.isEmpty()) {
            return Boolean.FALSE;
        }
        return Boolean.TRUE;
    }
}
